<template>
  <!-- 添加用户和添加群组 -->
  <div class="addcontainer">
    <div class="back el-icon-arrow-left"
         @click="back"></div>
    <div class="top">
      <router-link to="/addfriend"
                   class="addlink">添加好友</router-link>
      <router-link to="/addgroup"
                   class="addlink">添加群</router-link>
    </div>
    <router-view />
  </div>
</template>

<script>

export default {
  name: 'Add',
  methods: {
    back () {
      // 点击后返回聊天界面
      this.$emit('backtomain')
    }
  }
}
</script>

<style lang="less" scoped>
.addcontainer {
  border: 1px solid #9195a323;
  height: 100%;
  position: relative;
  width: 100%;

  .back {
    position: absolute;
    left: 10px;
    top: 15px;
    cursor: pointer;
  }
  .top {
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #9195a323;
    height: 50px;
    .addlink {
      margin-right: 20px;
      text-decoration: none;
      color: black;
    }
  }
}
</style>
